INSTANCE Cache Region and Coherence Executor
INSTANCE cache region
The INSTANCE cache region was introduced to Prevent Duplicate Activity Processing. It tracks activities currently being processed and helps prevent the same activity from being submitted again after a browser refresh, session timeout, or an attempt by another user.
When activity processing starts, OIPA stores an entry associated with the Activity GUID in the INSTANCE cache. If another processing request finds that entry, OIPA blocks the duplicate request and displays the following page-level message: Current activity is in progress. Please refresh the activity screen in some time.
The entry is removed when processing completes. This behavior applies to activities associated with Policy, Client, Customer, Plan, and Company entities.
Cache mapping and configuration
Configure INSTANCE in both of the following files across all agent nodes:
coherence-cache-config.xml
cycle-coherence-cache-config.xml
The following mapping belongs within <caching-scheme-mapping>:
| Instance Cache Mapping |
|---|
<cache-mapping> <cache-name>INSTANCE</cache-name> <scheme-name>SampleNearSchemeInstance</scheme-name> </cache-mapping> |
INSTANCE uses a near cache with a local front cache and a distributed backing cache.
| Configuration | Purpose |
|---|---|
| SampleNearSchemeInstance | Connects the local front cache to the distributed backing cache. |
| SamplePartitionedSchemeInstance | Provides the distributed backing cache across cluster members. |
| SampleMemoryLimitedSchemeInstance | Defines the local cache’s capacity, eviction policy, and entry expiry. |
The configuration example uses LRU eviction, high-units of 32000, low-units of 10, and an expiry-delay of 5m. The expiry delay specifies how long an entry remains valid after its last update; it is configurable.
Configuration consideration: Review the expiry setting against expected activity-processing durations. An in-progress marker can expire before a long-running activity finishes, so the configured retention period matters to duplicate-processing protection.
Coherence Executor Service
OIPA uses the Coherence Executor Service to execute processing tasks across the Cycle agent grid. OIPA instances and Cycle clients submit work, and participating agents execute it through their configured thread pools. This supports distributed batch processing and long-running background work.
The page’s configuration example defines the following fixed thread pool:
<c:fixed> <c:name system-property="executor.name">Single-Cache</c:name> <c:thread-count system-property="cycle.thread.count">15</c:thread-count> </c:fixed> |
Single-Cache is the configured executor name. The thread count is 15 unless overridden through cycle.thread.count. These settings can be overridden using JVM arguments such as -Dexecutor.name=Single-Cache and -Dcycle.thread.count=15.
The executor manages task execution, while the INSTANCE cache records which activities are already being processed. Together, they support distributed processing with duplicate-request checks.